<template>
  <el-dialog v-model="dialogVisible"  destroy-on-close>
    <start-new-office
        :empty-text="emptyText"
        :accept="accept"
        :tip="tip"
        :file-size="fileSize"
        @openDocument="openDocument"
    ></start-new-office>
  </el-dialog>
</template>
<script>

import StartNewOffice from "components/start-components/start-office/startNewOffice.vue";

export default {
  name: "startNewOfficeDialog",
  components: {StartNewOffice},
  props: {
    emptyText: {
      type: String,
      default: "无文档"
    },
    accept: {
      type: String,
      default: ".doc,.docx,.xls,.xlsx,.ppt,.pptx"
    },
    tip: {
      type: String,
      default: null,
    },
    fileSize: {
      type: [Number, String],
      default: "10MB"
    },
  },
  computed: {},
  data() {
    return {
      dialogVisible: false,
    }
  },
  methods: {
    show() {
      this.dialogVisible = true
    },
    close() {
      this.dialogVisible = false
    },
    openDocument(ossId) {
      this.$emit("openDocument", ossId, this.close)
    }
  }

}
</script>
<style scoped>

</style>
